package com.ymatou.iapi.userservice.parameter.enums;

/**
 * Created by liguo on 2016/12/7.
 */
public enum GenderEnum {
    /**
     * 保密
     */
    Hidden(0,"Hidden"),

    /**
     * 男
     */
    Male(1,"Male"),

    /**
     * 女
     */
    Female(2,"Female"),
    ;
    private int code;
    private String message;


    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
    
    public GenderEnum getUserEnum(int code){
        for (GenderEnum uenum:GenderEnum.values()) {
            if(uenum.getCode()==code){
                return uenum;
            }
        }
        return GenderEnum.Hidden;
    }

     GenderEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
